/* 监控面板容器 */
.monitoring-panel-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none; /* 让点击可以穿透到3D场景 */
  z-index: 100;
  display: flex;
  justify-content: space-between;
  padding: 20px;
  box-sizing: border-box;
}

/* 左侧和右侧面板组 */
.left-panels,
.right-panels {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 320px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  pointer-events: auto;
}

/* 面板通用样式 */
.monitoring-panel {
  background: rgba(10, 25, 47, 0.85);
  border: 1px solid rgba(116, 182, 255, 0.2);
  border-radius: 8px;
  padding: 15px;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0, 240, 255, 0.1);
  color: #e2e8f0;
  font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif;
  transition: all 0.3s ease;
}

.monitoring-panel:hover {
  box-shadow: 0 6px 30px rgba(0, 240, 255, 0.2);
  border-color: rgba(116, 182, 255, 0.4);
}

/* 面板标题样式 */
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(116, 182, 255, 0.2);
}

.panel-title {
  font-size: 14px;
  font-weight: 600;
  color: #74b6ff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-title::before {
  content: "";
  width: 4px;
  height: 16px;
  background: linear-gradient(180deg, #74b6ff 0%, #00f0ff 100%);
  border-radius: 2px;
}

/* 数据网格布局 */
.data-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* 数据卡片样式 */
.data-card {
  background: rgba(20, 37, 61, 0.7);
  border-radius: 6px;
  padding: 12px;
  transition: all 0.2s ease;
}

/* 数据更新动画 */
.data-update {
  animation: dataPulse 0.6s ease-out;
}

@keyframes dataPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(116, 182, 255, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(116, 182, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(116, 182, 255, 0);
  }
}

/* 条形图动画 */
@keyframes barGrow {
  from {
    height: 0;
    y: 100;
  }
  to {
    height: var(--bar-height);
    y: var(--bar-y);
  }
}

/* 环形图动画 */
@keyframes arcDraw {
  from {
    pathLength: 0;
    opacity: 0;
  }
  to {
    pathLength: 1;
    opacity: 0.8;
  }
}

.arc-animation {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  fill-opacity: 0;
  animation: arcDraw 0.8s ease-out forwards;
}

.data-card:hover {
  background: rgba(20, 37, 61, 0.9);
}

.data-label {
  font-size: 12px;
  color: #a0aec0;
  margin-bottom: 4px;
}

.data-value {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
}

/* 图表容器样式 */
.chart-container {
  height: 180px;
  margin-top: 10px;
  position: relative;
}

/* 告警统计样式 */
.alarm-stats {
  text-align: center;
  padding: 10px 0;
}

.alarm-count {
  font-size: 28px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 5px;
}

.alarm-label {
  font-size: 12px;
  color: #a0aec0;
}

/* 日志表格容器 */
.log-table-container {
  max-height: 200px;
  overflow-y: auto;
  border-radius: 6px;
}

/* 日志表格样式 */
.log-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  table-layout: fixed;
}

.log-table th {
  text-align: left;
  padding: 8px 4px;
  color: #a0aec0;
  font-weight: 600;
  border-bottom: 1px solid rgba(116, 182, 255, 0.1);
  background: rgba(10, 25, 47, 0.8);
  position: sticky;
  top: 0;
}

.log-table td {
  padding: 8px 4px;
  color: #e2e8f0;
  border-bottom: 1px solid rgba(116, 182, 255, 0.05);
  transition: all 0.2s ease;
}

.log-table tr:hover {
  background: rgba(20, 37, 61, 0.5);
}

/* 限制日志内容宽度 */
.log-content {
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 状态徽章样式 */
.status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(10, 25, 47, 0.8);
  border: 1px solid currentColor;
}

/* 日志行动画 */
@keyframes logSlideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.log-row {
  opacity: 0;
}

/* 滚动条样式 */
.left-panels::-webkit-scrollbar,
.right-panels::-webkit-scrollbar {
  width: 4px;
}

.left-panels::-webkit-scrollbar-track,
.right-panels::-webkit-scrollbar-track {
  background: rgba(10, 25, 47, 0.5);
  border-radius: 2px;
}

.left-panels::-webkit-scrollbar-thumb,
.right-panels::-webkit-scrollbar-thumb {
  background: rgba(116, 182, 255, 0.3);
  border-radius: 2px;
}

.left-panels::-webkit-scrollbar-thumb:hover,
.right-panels::-webkit-scrollbar-thumb:hover {
  background: rgba(116, 182, 255, 0.5);
}

/* 响应式设计 */
@media (max-width: 1200px) {
  .left-panels,
  .right-panels {
    width: 280px;
  }
}

@media (max-width: 992px) {
  .monitoring-panel-container {
    flex-direction: column;
    align-items: center;
  }
  
  .left-panels,
  .right-panels {
    width: 100%;
    max-width: 500px;
  }
}